# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Jakob Nixdorf <flocke@user-helfen-usern.de>

pkgname=perl-anyevent-xmpp
pkgver=0.55
pkgrel=6
pkgdesc="An implementation of the XMPP Protocol"
arch=('any')
depends=('perl>=5.10.0' 'perl-anyevent' 'perl-xml-parser' 'perl-digest-sha1'
	 'perl-object-event' 'perl-authen-sasl' 'perl-net-libidn'
	 'perl-xml-writer' 'perl-net-ssleay')
license=('GPL' 'PerlArtistic')
url="https://search.cpan.org/dist/AnyEvent-XMPP"
options=('!emptydirs')
replaces=('perl-net-xmpp2')
source=(https://search.cpan.org/CPAN/authors/id/M/MS/MSTPLBG/AnyEvent-XMPP-$pkgver.tar.gz)
sha256sums=('ec56b25e6a78630f79ee5e38b79a39957b8b89fb1ea03804f54defb9e3544256')

build() {
  cd "$srcdir"/AnyEvent-XMPP-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "$srcdir"/AnyEvent-XMPP-$pkgver
  install -dm0755 "$pkgdir"/usr/share/doc/$pkgname
  cp -a samples "$pkgdir"/usr/share/doc/$pkgname/
  make DESTDIR="$pkgdir" install
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name 'perllocal.pod' -delete
}
